<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <meta content="width=device-width, initial-scale=0.4, maximum-scale=0.4, user-scalable=0" name="viewport">
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/css/loading/style.css" rel="stylesheet">
    <style>
        body {
            background: url("/static/images/wx_bj/index_bj.jpg");
            background-size: 100% 100%;
            font-size: 20px;
            overflow: hidden;
            margin: 0;
            padding: 0;
            width: 100%;
        }
    </style>
</head>
<body>
<div id="loading" style="display: none;position: absolute;top: 0;left: 0;width: 100%;height: 100%;background-color: rgba(255,255,255,.5);text-align: center;line-height: 60;">
    <div class="sp sp-circle" style="display: inline-block;top: 50%;left: 50%"></div>
</div>
<input id="id" th:value="${session.staffid}" type="hidden">
<input id="isIndex" th:value="${isIndex}" type="hidden">
<input id="openId" th:value="${session.openId}" type="hidden">
<input id="cs_count" th:value="${staff.getCsCount()}" type="hidden">
<input id="fs_count" th:value="${staff.getFsCount()}" type="hidden">
<input id="is_jj" th:value="${staff.getIsJj()}" type="hidden">
<div style="    height: 36%;
    ">
</div>
<div class="a_btn"
     id="btn3" style="display: block; width: 51.02rem;height: 22.62rem;margin: 0 auto;    background: url('/static/images/1.png');background-size: 100% 100%"></div>

<div class="a_btn"
     id="btn2" style="display: block; width: 51.02rem;height: 22.62rem;margin: 6rem auto; background: url('/static/images/3.png');background-size: 100% 100%"></div>
<div class="a_btn"
     id="btn1" style="display: block; width: 51.02rem;height: 22.62rem;margin: 0 auto;    background: url('/static/images/2.png');background-size: 100% 100%"></div>

<div class="modal fade  bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog"  aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static"   >
    <div class="modal-dialog  bs-example-modal-lg" role="document" style="width: 95%">
        <div class="modal-content  bs-example-modal-lg" style="background-color: #b4b49b;">
            <div class="modal-header" style="font-size: 5rem">
                <br>
                <p style="text-align: center;line-height: 5rem;font-size: 7rem">宝鸡市总工会</p><br>
                <p style="text-align: center;line-height: 5rem">庆祝建党100周年</p>
                <p style="text-align: center;line-height: 5rem">劳动法律知识竞赛活动告知书</p>
            </div>
            <div class="modal-body  bs-example-modal-lg" style="font-size: 4rem">
                <p style="text-indent: 9rem">微信关注“宝鸡工会”公众号，在“工会活动”菜单下点击”法律知识竞赛“按钮，答题人填写姓名、电话、所属单位等信息进入，页面显示按键:题库学习、模拟答题、竞赛答题。</p><br>
                <p style="text-indent: 9rem">题库学习：4月5日开始开放，面向大众，所有职工均可通过手机学习。</p><br>
                <p style="text-indent: 9rem">模拟答题：4月5日开始开放，模拟内容与竞赛答题规定的一致，答题完毕点击“提交”即可。系统显示答题用时、成绩、及纠错回顾。</p><br>
                <p style="text-indent: 9rem">初赛答题：5月17日至23日开放，答题完毕点击“提交”即可。</p><br>
                <p style="text-indent: 9rem">复赛答题：6月2日至4日开放，答题完毕点击“提交”即可。</p>
            </div>
            <div class="modal-footer" style="text-align: center">
                <button  id="start_btn"   type="button" class="btn btn-default" data-dismiss="modal" style="font-size: 3rem">我已阅读</button>
            </div>
        </div>
    </div>
</div>



</body>
<script src="/static/js/jquery-1.10.2.min.js"></script>
<script src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

<script>
    $(function () {
        let innerHeight = window.innerHeight;
        $("body").height(innerHeight + 'px');
        if (window.name!=="rehome"){
            window.name='rehome'
            $('#myModal').modal({show:true});
        }
    })
    let openId = $("#openId").val()
    $(".a_btn").click(function () {
        let btnId = $(this).attr('id');
         let time = new Date().getTime();
        if (btnId === "btn1") {
            if (time > 1621180800000 && time < 1621785599000 || time > 1622563200000 && time < 1622822400000) {
                if (time > 1621180800000 && time < 1621785599000) {
                    if ($("#cs_count").val() !== "0") {
                        $("#loading").show();
                        window.location.replace("/answer?id=" + openId + "&&answerType=1");
                    } else {
                        alert("初赛每人只有两次答题机会，次数已经用完。")
                    }
                    return false;
                }
                if (time > 1622563200000 && time < 1622822400000) {
                    let $fsCount = $("#fs_count");
                    let $isJj = $("#is_jj");
                    if ($fsCount.val() !== "0" && $isJj.val() === "1") {
                        $("#loading").show();
                        window.location.replace("/answer?id=" + openId + "&&answerType=2");
                    } else {
                        if ($fsCount.val() === "0") {
                            alert("复赛每人只有两次答题机会，次数已经用完。")
                        }
                        if ($isJj.val() !== "1") {
                            alert("您尚未获得晋级资格")
                        }
                    }
                    return false;
                }
            } else {
                alert("考试时间未到,先做做练习或者模拟一下吧！初赛时间5月17日至23日,复赛时间6月2日至4日");
                return false;
            }
        }
        if (btnId === "btn2") {
            if (1!==1){
                alert("4月5日开始开放")
                return false
            }else {
                $("#loading").show();
                window.location.replace("/mockAnswer?id=" + openId + "&&answerType=" + 0);
            }
        }
        if (btnId === "btn3") {
            //time<1617552001000
            if (1!==1){
                alert("4月5日开始开放")
                return false
            }else {
                $("#loading").show();
                window.location.replace("/questionBank?id=" + openId);
            }
        }
    })
    pushHistory();

    function pushHistory() {
        history.pushState('', '', 'goWxIndex?id=' + openId)
    }

    window.addEventListener("popstate", function () {
        window.close();
    })


</script>
</html>

<!--

1617346569935--
1617552001000





-->